﻿using OrderTrace.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories.Dapper;
using Volo.Abp.EntityFrameworkCore;
using Dapper;
namespace OrderTrace
{
    public class Tpopf002DapperRepository: DapperRepository<OrderTraceDbContext>, ITpopf002DapperRepository, ITransientDependency
    {
        public Tpopf002DapperRepository(IDbContextProvider<OrderTraceDbContext> dbContextProvider)
       : base(dbContextProvider)
        {
        }

        public async Task<int> UpdatePlanWt(object param)
        {
            
            return await DbConnection.ExecuteAsync("Update TPOPF002   SET PLAN_WT = @Wt WHERE WHOLE_BACKLOG_SEQ = @WholeBackCodeSeq AND WHOLE_BACKLOG_NO = @WholeBackLogNo  AND ORDER_NO = @OrderNo", param, DbTransaction);
        }

        public async Task<int> UpdateWt(string Sql, object param)
        {
            return await DbConnection.ExecuteAsync(Sql, param, DbTransaction);
        }
    }
}
